package com.mooc.lib_video.test

import com.mooc.lib_network.entity.BaseRepository
import com.mooc.lib_network.entity.NetResult
import com.mooc.lib_network.entity.RetrofitSingle
import com.mooc.lib_video.ApiService
import com.mooc.lib_common.model.HomeFeedEntity

class TestRepo : BaseRepository() {

    //外部调用获数据方法
    suspend fun callFeed() : NetResult<HomeFeedEntity>{
      return requestCall(call = {requestFeed()})
    }

    //获取列表数据方法
    private suspend fun requestFeed(): NetResult<HomeFeedEntity> {
        return handlerResponse(
            RetrofitSingle.instance().getRetrofit().create(ApiService::class.java)
                .requestHomeList(0,"all",12,0)
        )
    }

}